]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ShellApp: use st_icon_set_fallback_icon_name() to specify app fallback
authorCosimo Cecchi <cosimoc@gnome.org>
Sat, 14 Mar 2015 22:44:54 +0000 (15:44 -0700)
committerCosimo Cecchi <cosimoc@gnome.org>
Sun, 15 Mar 2015 00:31:07 +0000 (17:31 -0700)
We can now safely pass a NULL GIcon to st_icon_set_gicon(), and specify
a more generic fallback using the new API we just introduced.

https://bugzilla.gnome.org/show_bug.cgi?id=746219

src/shell-app.c

index abea69fface41afd75a892606be1a21517e2bbe8..9c03a4ad8a30e63c5a2c12956ef12ffd10646d2c 100644 (file)
@@ -216,18 +216,10 @@ shell_app_create_icon_texture (ShellApp   *app,
 
   ret = st_icon_new ();
   st_icon_set_icon_size (ST_ICON (ret), size);
+  st_icon_set_fallback_icon_name (ST_ICON (ret), "application-x-executable");
 
   icon = g_app_info_get_icon (G_APP_INFO (app->info));
-  if (icon != NULL)
-    {
-      st_icon_set_gicon (ST_ICON (ret), icon);
-    }
-  else
-    {
-      icon = g_themed_icon_new ("application-x-executable");
-      st_icon_set_gicon (ST_ICON (ret), icon);
-      g_object_unref (icon);
-    }
+  st_icon_set_gicon (ST_ICON (ret), icon);
 
   return ret;
 }